package com.funsport.common;

/**
 * 系统常量
 *
 * @author Fun-Sport Team
 */
public class Constants {

    /**
     * JWT Token 前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * JWT Token Header
     */
    public static final String TOKEN_HEADER = "Authorization";

    /**
     * 用户ID Key
     */
    public static final String USER_ID_KEY = "userId";

    /**
     * 用户角色 Key
     */
    public static final String USER_ROLE_KEY = "userRole";

    /**
     * Redis Key 前缀
     */
    public static final String REDIS_KEY_PREFIX = "funsport:";

    /**
     * 缓存过期时间（秒）
     */
    public static final long CACHE_EXPIRE_TIME = 3600L;

    /**
     * 分页默认页码
     */
    public static final int DEFAULT_PAGE = 1;

    /**
     * 分页默认大小
     */
    public static final int DEFAULT_PAGE_SIZE = 20;

    /**
     * 分页最大大小
     */
    public static final int MAX_PAGE_SIZE = 100;

    /**
     * 积分规则
     */
    public static class Points {
        public static final int SIGNIN = 5;
        public static final int EVENT_JOIN = 10;
        public static final int EVENT_COMPLETE = 50;
        public static final int EVENT_CHECKIN = 20;
        public static final int INVITE = 100;
        public static final int REVIEW = 5;
        public static final int POST = 10;
        public static final int COMMENT = 2;
    }

    /**
     * 微信API相关
     */
    public static class WeChat {
        public static final String CODE2SESSION_URL = "https://api.weixin.qq.com/sns/jscode2session";
    }
}

